[SUBROUTINE]
version = 1.14
icon = lathe-surface-id.png
name = _("Boring")
type = boring
help = _("<b>Internal straight boring</b>&#10;Cutter orientation should be 3, 9, 8, 4 or None")
order = act hx b_x e_x hz b_z e_z hf fin

[PARAM_ACT]
name = _("Active")
icon = enable.png
type = bool
value = 1

[PARAM_HX]
name = _("X axis")
type = sub-header

[PARAM_B_X]
name = _("Begin diameter")
type = float
icon = x.png
value = 0.9
metric_value = 20.0
minimum_value = 0.0
not_allowed = 0
header = hx

[PARAM_E_X]
name = _("End diameter")
type = float
icon = x-end.png
value = 1.0
metric_value = 22.0
minimum_value = 0.0
not_allowed = 0
header = hx

[PARAM_HZ]
name = _("Z axis")
type = sub-header

[PARAM_B_Z]
name = _("Begin")
type = float
icon = z.png
value = 0.0
metric_value = 0.0
header = hz

[PARAM_E_Z]
name = _("End")
type = float
icon = z-end.png
value = -1.0
metric_value = -25.0
header = hz

[PARAM_HF]
name = _("Finishing")
type = sub-header

[PARAM_FIN]
name = _("Number of passes")
icon = finish.png
type = int
value = 1
minimum_value = 0
tool_tip = _("Or spring passes")
header = hf

[VALIDATION]
content =
	if #param_act == 1 :
		if self.check_hash('#param_b_x', 0.5) > self.check_hash('#param_e_x', 0.6) :
			self.msg_inv(_('Begin diameter must be less than End diameter'), 1)
			VALIDATED = False
			
		if TOOL_TABLE.get_tool_orient() not in [0, 3, 4, 8, 9] :
			self.msg_inv(_('Cutter orientation should be 8, 9, 3, 4 or 0'), 2)

[CALL]
content =
	(begin #sub_name)
	(author : Fernand Veilleux)
	
	o<#self_id_act> if [#param_act]
		o<boring> CALL [#param_b_x] [#param_e_x] [#param_b_z] [#param_e_z] [#param_fin]
	o<#self_id_act> endif
	
	(end #sub_name)
